package com.wesley.method;

public class Demo02 {
    public static void main(String[] args) {
        int larger = max(10,20);
        System.out.println(larger);

        System.out.println(max(10,20));
    }

    //比大小
    public static int max(int num1, int num2){
        int result = 0;

        if(num1 == num2){
            System.out.println("数值相等");
            return 0;//终止方法
        }

        if(num1 > num2){
            result = num1;
        }else {
            result = num2;
        }

        return result;
    }
}
